/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.scene.dao;

import com.lczyfz.istep.common.persistence.CrudDao;
import com.lczyfz.istep.common.persistence.annotation.MyBatisDao;
import com.lczyfz.istep.modules.scene.entity.SceneCtfEnvironmentInstance;
import com.lczyfz.istep.modules.scene.entity.SceneEnvironmentInstanceOs;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * CTF实验环境实例DAO接口
 * @author dh
 * @version 2017-05-15
 */
@MyBatisDao
public interface SceneCtfEnvironmentInstanceDao extends CrudDao<SceneCtfEnvironmentInstance> {
    void  envInstanceRouterInsert (SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);
    void  envInstanceNetworkInsert (SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);
    void  envInstanceSecurityGroupInsert (SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);
    void  envInstanceVmTemplateInsert (SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);
    void  envInstancePortInsert (SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);
    void  envInstanceFirewallInsert(SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);
    void  envInstanceFirewallRuleInsert(SceneEnvironmentInstanceOs sceneEnvironmentInstanceOs);

    List<SceneEnvironmentInstanceOs> findPortListById(@Param("id")String id,@Param("environmentInstanceId")String environmentInstanceId);

    List<SceneEnvironmentInstanceOs> findFirewallListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findFirewallRuleListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findNetworkListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findPortListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findRouterListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findSecurityGroupListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findVmTemplateListByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    List<SceneEnvironmentInstanceOs> findOperateMachineByInstanceId(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);


    void deleteInstanceFirewall(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    void deleteInstanceFirewallRule(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    void deleteInstanceRouter(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    void deleteInstanceNetwork(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    void deleteInstancePort(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    void deleteInstanceSecurityGroup(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    void deleteInstanceVmTemplate(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
}